<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>eRPC Generator (erpcgen): Log::SetOutputLevel Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="customdoxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="nxp_logo_small.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">eRPC Generator (erpcgen)
   &#160;<span id="projectnumber">Rev. 1.7.4</span>
   </div>
   <div id="projectbrief">NXP Semiconductors</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('class_log_1_1_set_output_level.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pro-attribs">Protected Attributes</a> &#124;
<a href="class_log_1_1_set_output_level-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">Log::SetOutputLevel Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>Utility class to temporarily change the logging output level.  
 <a href="class_log_1_1_set_output_level.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="_logging_8h_source.html">Logging.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:af42c4c02b1ed68d344fdf21a417acf66"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_log_1_1_set_output_level.html#af42c4c02b1ed68d344fdf21a417acf66">SetOutputLevel</a> (<a class="el" href="class_logger.html#a5209ca5ee1a2a8181287485e950cf381">Logger::log_level_t</a> level)</td></tr>
<tr class="memdesc:af42c4c02b1ed68d344fdf21a417acf66"><td class="mdescLeft">&#160;</td><td class="mdescRight">Default constructor.  <a href="#af42c4c02b1ed68d344fdf21a417acf66">More...</a><br /></td></tr>
<tr class="separator:af42c4c02b1ed68d344fdf21a417acf66"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7a6868510087c10610022dabcab27f55"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_log_1_1_set_output_level.html#a7a6868510087c10610022dabcab27f55">SetOutputLevel</a> (<a class="el" href="class_logger.html">Logger</a> *logger, <a class="el" href="class_logger.html#a5209ca5ee1a2a8181287485e950cf381">Logger::log_level_t</a> level)</td></tr>
<tr class="memdesc:a7a6868510087c10610022dabcab27f55"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructor.  <a href="#a7a6868510087c10610022dabcab27f55">More...</a><br /></td></tr>
<tr class="separator:a7a6868510087c10610022dabcab27f55"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:add93dff7c0b5c79cf5a167617128402d"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_log_1_1_set_output_level.html#add93dff7c0b5c79cf5a167617128402d">~SetOutputLevel</a> ()</td></tr>
<tr class="memdesc:add93dff7c0b5c79cf5a167617128402d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destructor.  <a href="#add93dff7c0b5c79cf5a167617128402d">More...</a><br /></td></tr>
<tr class="separator:add93dff7c0b5c79cf5a167617128402d"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-attribs"></a>
Protected Attributes</h2></td></tr>
<tr class="memitem:af042e88d9111d1499117ec6651e536cf"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="af042e88d9111d1499117ec6651e536cf"></a>
<a class="el" href="class_logger.html">Logger</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_log_1_1_set_output_level.html#af042e88d9111d1499117ec6651e536cf">m_logger</a></td></tr>
<tr class="memdesc:af042e88d9111d1499117ec6651e536cf"><td class="mdescLeft">&#160;</td><td class="mdescRight">The logger instance we're controlling. <br /></td></tr>
<tr class="separator:af042e88d9111d1499117ec6651e536cf"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8fda3b2fc0a7e316f750819ed80e5c22"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a8fda3b2fc0a7e316f750819ed80e5c22"></a>
<a class="el" href="class_logger.html#a5209ca5ee1a2a8181287485e950cf381">Logger::log_level_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_log_1_1_set_output_level.html#a8fda3b2fc0a7e316f750819ed80e5c22">m_saved</a></td></tr>
<tr class="memdesc:a8fda3b2fc0a7e316f750819ed80e5c22"><td class="mdescLeft">&#160;</td><td class="mdescRight">Original logging output level. <br /></td></tr>
<tr class="separator:a8fda3b2fc0a7e316f750819ed80e5c22"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Utility class to temporarily change the logging output level. </p>
<p>This class will change the current logging output level of a given logger instance. Then when it falls out of scope it will set the level back to what it was originally.</p>
<p>Use like this: </p><div class="fragment"><div class="line"><span class="comment">// output level is some value here</span></div><div class="line">{</div><div class="line">    <a class="code" href="class_log_1_1_set_output_level.html">Log::SetOutputLevel</a> leveler(Logger::DEBUG);</div><div class="line">    <span class="comment">// now output level is DEBUG</span></div><div class="line">    <a class="code" href="class_log.html#abfddf74c388c70413c8dbf5476fa2834">Log::log</a>(<span class="stringliteral">&quot;my debug message 1&quot;</span>);</div><div class="line">    <a class="code" href="class_log.html#abfddf74c388c70413c8dbf5476fa2834">Log::log</a>(<span class="stringliteral">&quot;my debug message 2&quot;</span>);</div><div class="line">}</div><div class="line"><span class="comment">// output level is restored to previous value</span></div></div><!-- fragment --> </div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="af42c4c02b1ed68d344fdf21a417acf66"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">Log::SetOutputLevel::SetOutputLevel </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="class_logger.html#a5209ca5ee1a2a8181287485e950cf381">Logger::log_level_t</a>&#160;</td>
          <td class="paramname"><em>level</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Default constructor. </p>
<p>Saves the current logging output level of the global logger, as managed by the <a class="el" href="class_log.html" title="Wraps a set of static functions for easy global logging access. ">Log</a> class, and sets the new level to <em>level</em>. </p>

</div>
</div>
<a class="anchor" id="a7a6868510087c10610022dabcab27f55"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">Log::SetOutputLevel::SetOutputLevel </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="class_logger.html">Logger</a> *&#160;</td>
          <td class="paramname"><em>logger</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="class_logger.html#a5209ca5ee1a2a8181287485e950cf381">Logger::log_level_t</a>&#160;</td>
          <td class="paramname"><em>level</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Constructor. </p>
<p>Saves the current logging output level of <em>logger</em> and sets the new level to <em>level</em>. </p>

</div>
</div>
<a class="anchor" id="add93dff7c0b5c79cf5a167617128402d"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">Log::SetOutputLevel::~SetOutputLevel </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Destructor. </p>
<p>Restores the saved logging output level. </p>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="_logging_8h_source.html">Logging.h</a></li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- HTML footer for doxygen 1.8.5-->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul class="foot">
    <li class="footer">Copyright 2016-2020 NXP Semiconductors. All rights reserved.
    </li>
  </ul>
</div>
</body>
</html>
